package edu.njust.Service.commodity;

import edu.njust.dao.CommodityMapper;
import edu.njust.domain.Commodity;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public interface CommodityService {

    public boolean deleteCommodity(int id);
    //插入商品
    public boolean insertCommodity(Commodity commodity);
    //选择商品
    public	Commodity selectById(int id);
    //更新商品
    public boolean updateById(Commodity commodity);
    //分页模糊查询
    public List<Commodity> pageSelect(String commodityName,int commodityTypeID,int start,int pageSize);
    //分页模糊查询总条数
    public int countSelect(String commodityName, int commodityTypeID);
    //ajax 验证是否存在 此商品
    public boolean selectYZ(String commodityName);

}
